@import "../style/variable";
@import "../style/mixin";

.dev-tools { .tools {
    .settings {
        @include overflow-auto(y);
        .separator {
            height: 10px;
        }
        .text {
            padding: $padding;
            color: $gray-dark;
            font-size: 12px;
        }
        .select, .range, .color {
            cursor: pointer;
        }
        .select .head, .switch, .range .head, .color .head {
            padding: $padding;
            background: #fff;
            font-size: $font-size;
            border-bottom: 1px solid $gray-light;
            border-top: 1px solid $gray-light;
            margin-top: -1px;
        }
        .select .head, .range .head, .color .head {
            transition: background $anim-duration, color $anim-duration;
            span {
                float: right;
            }
            &:active {
                background: $blue;
                color: #fff;
            }
        }
        .color .head span {
            display: inline-block;
            border: 1px solid $gray-dark;
            width: 15px;
            height: 15px;
        }
        .select ul {
            display: none;
            &.open {
                display: block;
            }
            li {
                padding: $padding;
                background: $gray-light;
                transition: background $anim-duration, color $anim-duration;
                &:active {
                    background: $blue;
                    color: #fff;
                }
            }
        }
        .color ul {
            display: none;
            padding: $padding;
            font-size: 0;
            background: $gray-light;
            &.open {
                display: block;
            }
            li {
                display: inline-block;
                width: 20px;
                border: 1px solid $gray-dark;
                height: 20px;
                margin-right: 10px;
            }
        }
        .range .input-container {
            display: none;
            padding: $padding;
            background: $gray-light;
            position: relative;
            &.open {
                display: block;
            }
            .range-track {
                height: 4px;
                width: 100%;
                padding: 0 $padding;
                position: absolute;
                left: 0;
                top: 16px;
                .range-track-bar {
                    background: $gray;
                    border-radius: 2px;
                    overflow: hidden;
                    width: 100%;
                    height: 4px;
                    .range-track-progress {
                        height: 100%;
                        background: $gray-dark;
                        width: 50%;
                    }
                }
            }
            input {
                -webkit-appearance: none;
                background: transparent;
                height: 4px;
                width: 100%;
                position: relative;
                top: -3px;
                margin: 0 auto;
                outline: none;
                border-radius: 2px;
            }
            input::-webkit-slider-thumb {
                -webkit-appearance: none;
                position: relative;
                top: 0px;
                z-index: 1;
                width: 16px;
                border: none;
                height: 16px;
                border-radius: 10px;
                background: radial-gradient(circle at center, $gray 0, $gray 15%, #fff 22%, #fff 100%);
                box-shadow: $box-shadow;
            }
        }
        .switch {
            .checkbox {
                float: right;
                position: relative;
                vertical-align: top;
                width: 46px;
                height: 20px;
                padding: 3px;
                border-radius: 18px;
                box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
                cursor: pointer;
                background-image: linear-gradient(to bottom, #eeeeee, white 25px);
                .input {
                    position: absolute;
                    top: 0;
                    left: 0;
                    opacity: 0;
                }
                .label {
                    pointer-events: none;
                    position: relative;
                    display: block;
                    height: 14px;
                    font-size: 10px;
                    text-transform: uppercase;
                    background: #eceeef;
                    border-radius: inherit;
                    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
                    transition: 0.15s ease-out;
                    transition-property: opacity background;
                    &:before, &:after {
                        position: absolute;
                        top: 50%;
                        margin-top: -.5em;
                        line-height: 1;
                        transition: inherit;
                    }
                }
                .input:checked ~ .label {
                    background: $blue;
                    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
                }
                .input:checked ~ .label:before {
                    opacity: 0;
                }
                .input:checked ~ .label:after {
                    opacity: 1;
                }
                .handle {
                    position: absolute;
                    pointer-events: none;
                    top: 0;
                    left: 0;
                    width: 18px;
                    height: 18px;
                    border-radius: 10px;
                    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
                    background-image: linear-gradient(to bottom, white 40%, #f0f0f0);
                    transition: left 0.15s ease-out;
                }
                .handle:before {
                    content: '';
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    margin: -6px 0 0 -6px;
                    width: 12px;
                    height: 12px;
                    border-radius: 6px;
                    box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
                    background-image: linear-gradient(to bottom, #eeeeee, white);
                }
                .input:checked ~ .handle {
                    left: 30px;
                    box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
                }
            }
        }
    }
} }